home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _GUICtrlStatusBarShowHide.au3 < prev    next >
Text File  |  2007-09-08  |  925b  |  35 lines

  1. opt("MustDeclareVars", 1)
  2.  
  3. #include <GUIConstants.au3>
  4. #Include <GuiStatusBar.au3>
  5.  
  6. Local $gui, $StatusBar1, $msg, $btn_ShowHide, $Hidden = 0
  7. Local $a_PartsRightEdge[3] = [100, 350, -1]
  8. Local $a_PartsText[3] = ["New Text", "More Text", "Even More Text"]
  9.  
  10. $gui = GUICreate("Status Bar Show/Hide", 500, -1, -1, -1, $WS_SIZEBOX)
  11. $StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText)
  12. $btn_ShowHide = GUICtrlCreateButton("Show/Hide StatusBar", 10, 10, 120, 25)
  13.  
  14. GUISetState(@SW_SHOW)
  15.  
  16.  
  17. While 1
  18.     $msg = GUIGetMsg()
  19.     Select
  20.         Case $msg = $GUI_EVENT_RESIZED
  21.             _GUICtrlStatusBarResize ($StatusBar1)
  22.         Case $msg = $btn_ShowHide
  23.             If $Hidden Then
  24.                 _GuiCtrlStatusBarShowHide($StatusBar1, @SW_SHOW)
  25.             Else
  26.                 _GuiCtrlStatusBarShowHide($StatusBar1, @SW_HIDE)
  27.             EndIf
  28.             $Hidden = Not $Hidden
  29.         Case $msg = $GUI_EVENT_CLOSE
  30.             ExitLoop
  31.         Case Else
  32.             ;;;;;
  33.     EndSelect
  34.     
  35. WEnd